var e;
e = require("../../../siteinfo.js"), (global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/member/index/index" ], {
    "4ac3": function(e, i, n) {
        (function(e) {
            n("98af"), t(n("66fd"));
            var i = t(n("d738"));
            function t(e) {
                return e && e.__esModule ? e : {
                    default: e
                };
            }
            wx.__webpack_require_UNI_MP_PLUGIN__ = n, e(i.default);
        }).call(this, n("543d").createPage);
    },
    "5fb2": function(e, i, n) {
        n.r(i);
        var t = n("d73b"), a = n.n(t);
        for (var s in t) "default" !== s && function(e) {
            n.d(i, e, function() {
                return t[e];
            });
        }(s);
        i.default = a.a;
    },
    "86d3": function(e, i, n) {
        var t = n("c97b");
        n.n(t).a;
    },
    c97b: function(e, i, n) {},
    d738: function(e, i, n) {
        n.r(i);
        var t = n("f99a"), a = n("5fb2");
        for (var s in a) "default" !== s && function(e) {
            n.d(i, e, function() {
                return a[e];
            });
        }(s);
        n("86d3");
        var c = n("f0c5"), o = Object(c.a)(a.default, t.b, t.c, !1, null, "a3088d86", null, !1, t.a, void 0);
        i.default = o.exports;
    },
    d73b: function(i, n, t) {
        (function(i) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            }), n.default = void 0;
            var a = t("ebe2");
            function s(e, i) {
                var n = Object.keys(e);
                if (Object.getOwnPropertySymbols) {
                    var t = Object.getOwnPropertySymbols(e);
                    i && (t = t.filter(function(i) {
                        return Object.getOwnPropertyDescriptor(e, i).enumerable;
                    })), n.push.apply(n, t);
                }
                return n;
            }
            function c(e) {
                for (var i = 1; i < arguments.length; i++) {
                    var n = null != arguments[i] ? arguments[i] : {};
                    i % 2 ? s(Object(n), !0).forEach(function(i) {
                        o(e, i, n[i]);
                    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : s(Object(n)).forEach(function(i) {
                        Object.defineProperty(e, i, Object.getOwnPropertyDescriptor(n, i));
                    });
                }
                return e;
            }
            function o(e, i, n) {
                return i in e ? Object.defineProperty(e, i, {
                    value: n,
                    enumerable: !0,
                    configurable: !0,
                    writable: !0
                }) : e[i] = n, e;
            }
            !function(e) {
                e && e.__esModule;
            }(t("3a97"));
            var r = {
                mixins: [ a.checkLogin ],
                data: function() {
                    return {
                        verson: "",
                        statusBarHeight: 0,
                        host: e.siteroot,
                        hasLogin: !1,
                        detail: {},
						site: {},
						config: {},
                        uid: !1,
                        menuList: [ {
                            title: "",
                            data: []
                        },{
                            title: "常用工具",
                            data: []
                        }, {
                            title: "福利专区",
                            data: []
                        } ],

                        bannerList: [ {
                            ad_id: 1,
                            banner_url: "https://express.17huaban.com/attachs/imge/bjb1.png",
                            title: "轮播",
                            link_url: "/pages/delivery/delivery?type=1"
                        }, {
                            ad_id: 3,
                            banner_url: "https://express.17huaban.com/attachs/imge/jbj3.png",
                            title: "轮播",
                            link_url: "/pages/delivery/delivery?type=1"
                        } ],

                        menuList1: [ {
                            title: "",
                            data: []
                        } ],
                        default_avatar: "/assets/img/default_avatar.png",
                        m: 1
                    };
                },
                onLoad: function() {
                    this.statusBarHeight =wx.getSystemInfoSync().statusBarHeight;
                    this.site = this.$db.get("site"), this.config = this.$db.get("config"), this.uid = this.$db.get("userId");
					var n = i.getAccountInfoSync(), t = e.siteroot;
                    this.verson = n.miniProgram.version, this.menuList[1].data = [ {
                        icon: "/static/image/mine-5.png",
                        name: "查运费",
                        url: "/pages/member/freight/freight",
                        check: !0
                    }, {
                        icon: "/static/image/j-6.png",
                        name: "优惠券",
                        info: "做任务",
                        url: "/pages/member/coupon/coupon",
                        check: !1
                    }, {
                        icon: "/static/image/j-icon-12.png",
                        name: "兑换优惠券",
                        url: "/subpages/pages/cashPrize/cashPrize",
                        check: !1
                    }, {
                        icon: "/static/image/mine-6.png",
                        name: "订阅消息",
                        url: "dingyue",
                        check: !0
                    },{
                        icon: "/static/image/mine-7.png",
                        name: "寄件咨询",
                        url: "/subpages/pages/mailing-consult/mailing-consult",
                        check: !1
                    },{
                        icon: "/static/image/mine-10.png",
                        name: "我要反馈",
                        url: "/pages/member/suggest/suggest",
                        check: !0
					}],
					this.config.is_authorize_open==1 && this.menuList[1].data.push({
                        icon: "/static/image/set.png",
                        name: "授权设置",
                        url: "/subpages/pages/user-auth/user-auth",
                        check: !0
					}), 
					this.config.is_invoice_open==1 && this.menuList[1].data.push({
                        icon: "/static/image/mine-2.png",
                        name: "申请发票",
                        url: "/subpages/pages/invoice/invoice",
                        check: !0
					}), 
					this.menuList[1].data.push({
                        icon: "/static/image/mine-11.png",
                        name: "退出",
                        url: "exit",
                        check: !1
					}), 
					this.$store.state.configindex && this.showOther(this.$store.state.configindex);
                },
                watch: {
                    configindex: function(e) {
                        this.showOther(e);
                    }
                },
                onShow: function() {
                    var e = this;
                    this.$db.get("userToken") ? this.hasLogin = !0 : this.hasLogin = !1;
                    var i = this.$db.get("h5auth"), n = this.$db.get("h5authNo");
                    "1" != i || n ? "2" != i || n ? (i && this.$db.del("h5auth"), this.renewalUser()) : (this.$db.del("h5auth"), 
                    this.$db.set("h5authNo", "1"), this.$common.errorToShow("授权个人信息失败", function() {
                        e.renewalUser();
                    })) : (this.$db.del("h5auth"), this.$db.set("h5authNo", "1"), this.$common.successToShow("授权个人信息成功", function() {
                        e.renewalUser();
                    })), null != this.$store.state.configindex && this.configindexFunc();
                },
                methods: {
                    showOther: function(e) {
                        this.bannerList = e.ad;
                        0 != this.site.juke ? this.menuList[2].data = [] : this.menuList[2].data = [];
                    },

                    goOrderPage: function (n) {
                        var handle = n;
                        wx.setStorageSync('handle',handle);
                        i.switchTab({ url: "/pages/find/index/index"});
                    },

                    to_inte: function() {
                        this.hasLogin ? i.navigateTo({
                            url: "/subpages/pages/integral/integral"
                        }) : this.checkIsLogin();
                    },
                    jumpbanner: function(e) {
                        var i = e.link_url;
                        this.$common.navigateTo(i);
                    },
                    to_remain: function() {
                        this.hasLogin ? i.navigateTo({
                            url: "/pages/member/remain/remain"
                        }) : this.checkIsLogin();
                    },
                    to_coupon: function() {
                        i.navigateTo({
                            url: "/pages/member/coupon/coupon?status=1"
                        });
                    },
                    to_remain: function() {
                        this.hasLogin ? i.navigateTo({
                            url: "/pages/member/remain/remain"
                        }) : this.checkIsLogin();
                    },
                    to_citydaili: function() {
                        i.navigateTo({
                            url: "/pages/member/invite/list?type=6"
                        });
                    },
                    to_areadaili: function() {
                        i.navigateTo({
                            url: "/pages/member/invite/list?type=7"
                        });
                    },
                    to_face: function() {
                        i.navigateTo({
                            url: "/subpages/pages/user-info/user-info"
                        });
										},
										to_mobile: function() {
											i.navigateTo({
												url: "/subpages/pages/user-mobile/user-mobile"
											});
										},
										to_wdjf: function() {
											this.site = this.$db.get("site");
											var wxappcode2 = this.site.wxappcode2;
													i.previewImage({
															current: 0,
															urls: [wxappcode2]
													});
										},
					
                    skipPage: function(e, n) {
                        var t = this;
                        if (e) if ("exit" === e) {
                            if (!this.hasLogin) return;
                            i.showModal({
                                title: "提示",
                                content: "确定要退出当前登录？",
                                success: function(e) {
                                    e.confirm && (t.$db.clear(), t.detail = {}, i.switchTab({
                                        url: "/pages/index/index"
                                    }));
                                }
                            });
                        } else if ("service" === e) i.makePhoneCall({
                            phoneNumber: this.configindex.kfphone || this.configindex.kfmobile
                        }); else if ("dingyue" === e) t.switchChangeMsg(); else if ("/pages/member/invite/invite" == e) this.$common.navigateTo(e); else {
                            if (!this.hasLogin) return void this.checkIsLogin();
                            this.$common.navigateTo(e);
                        } else if (!this.hasLogin) return void this.checkIsLogin();
                    },
                    switchChangeMsg: function() {
                        var e = this.configindex.tmpl;
                        console.log("==tmp==", e), wx.requestSubscribeMessage({
                            tmplIds: [ "" + e[0], "" + e[1], "" + e[2] ],
                            success(e) {
                                console.log("已授权接收订阅消息");
                            },
                            fail(e) {
                                console.log(e);
                            }
                        });
                    },
                    renewalUser: function() {
                        var e = this;
                        this.hasLogin && this.$api.getUserInfoApi({
                            user_id: this.$db.get("userId")
                        }, function(n) {
                            if ("1" == n.code) {
                                var t = n.data || {}, a = (t.avatar, t.nickname, t.avatar_auth), s = void 0 === a ? null : a;
                                e.detail = c(c({}, n.data), {}, {});
                                var o = n.data;
                                e.$db.set("userInfo", o), e.$db.del("shareId"), e.$db.del("is_business"), e.$db.del("thirduserid"), 
                                1 == s && i.reLaunch({
                                    url: "/subpages/pages/user-info/user-info"
                                });
                            } else e.$db.clear(), e.$common.errorToShow(n.msg);
                        });
                    }
                }
            };
            n.default = r;
        }).call(this, t("543d").default);
    },
    f99a: function(e, i, n) {
        n.d(i, "b", function() {
            return t;
        }), n.d(i, "c", function() {
            return a;
        }), n.d(i, "a", function() {});
        var t = function() {
            this.$createElement, this._self._c;
        }, a = [];
    }
}, [ [ "4ac3", "common/runtime", "common/vendor" ] ] ]);